<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form action="{:url('submitCreateStructureAction')}" method="post" >
        <div>表属性</div>
        <ul>
            <li>
                <label for="name">名称</label>
                <input type="text" id="name" name="name" value="<?php if(isset($table)&&isset($table['name'])) echo $table['name'];?>"/>
            </li>
            <li>
                <label for="title">标题</label>
                <input type="text" id="title" name="title" value="<?php if(isset($table)&&isset($table['title'])) echo $table['title'];?>"/>
            </li>
            <li>
                <label for="describe">描述</label>
                <input type="text" id="describe" name="describe" value="<?php if(isset($table)&&isset($table['describe'])) echo $table['describe'];?>"/>
            </li>
            <li>
                <label for="primary_key_field">主键</label>
                <input type="text" id="primary_key_field" name="primary_key_field" value="<?php if(isset($table)&&isset($table['primary_key_field'])) echo $table['primary_key_field'];?>"/>
            </li>
        </ul>
        <div>字段</div>
        <table>
            <tr><th>名称</th><th>别名</th><th>标题</th><th>描述</th><th>数据类型</th><th>最大长度</th><th>能否为空</th><th>类型</th><th>类型参数</th></tr>
            <foreach name="fields" item="item">
            <tr><td>{$item.name}</td><td>{$item.alias}</td><td>{$item.title}</td><td>{$item.describe}</td><td>{$item.data_type}</td><td>{$item.max_length}</td><td>{$item.is_nullable}</td><td>{$item.type}</td><td>{$item.type_params}</td></tr>
            </foreach>
        </table>
        
    </form>
</body>
</html>
